1
일반 프롬프트를 넘어서기
AI011Lesson 7
00:00

세부 조정과 전문화된 아키텍처를 통한 최적화

1. 프롬프트를 넘어서기

"소샷" 프롬프팅은 강력한 시작점이지만, 인공지능 솔루션을 확장할 때는 종종 감독 기반 세부 조정이 과정은 특정 지식이나 행동을 모델의 가중치에 직접 고정합니다.

결정 사항: 응답 품질 향상과 토큰 비용 절감 효과가 계산 및 데이터 준비 작업의 큰 노력보다 크다고 판단될 때만 세부 조정을 수행해야 합니다.

$비용 = 토큰 수 \times 단가$

2. 소형 언어 모델(전체) 혁명

소형 언어 모델(SLMs) 대규모 모델의 매우 효율적인 축소판입니다 (예: Phi-3.5, Mistral Small). 고도로 정제된 고품질 데이터로 훈련됩니다.

단점: SLM은 상당히 낮은 지연 시간을 제공하고 엣지 배포(장치 내에서 로컬로 실행)를 가능하게 하지만, 대규모 언어 모델에서 볼 수 있는 광범위한 일반화된 '인간 같은' 지능을 포기해야 합니다.

3. 전문화된 아키텍처

  • 전문가 집합(MoE): 추론 중에도 계산 효율성을 유지하면서 전체 모델 크기를 확장하는 기술입니다. 주어진 토큰에 대해 전문가 중 일부만 활성화됩니다 (예: Phi-3.5-MoE).
  • 다중 모달리티: 텍스트, 이미지, 때로는 오디오를 동시에 처리하도록 설계된 아키텍처로, 텍스트 생성을 넘어선 다양한 활용 가능성을 확장합니다 (예: Llama 3.2).
효율성 계층
항상 먼저 프롬프트 공학 시도하세요. 실패하면 RAG (검색 보강 생성). 이후에는 세부 조정 최종 고급 최적화 단계로만 사용하세요.
model_selection.py
TERMINALbash — 80x24
> Ready. Click "Run" to execute.
>
Question 1
When does the course recommend proceeding with fine-tuning over prompt engineering?
When the benefits in quality and cost (reduced token usage) outweigh compute effort.
Whenever you need the model to sound more human-like.
As the very first step before trying RAG or prompt engineering.
Only when deploying to an edge device.
Question 2
Which model architecture allows scaling model size while maintaining computational efficiency?
Supervised Fine-Tuning (SFT)
Retrieval-Augmented Generation (RAG)
Mixture of Experts (MoE)
Multimodality
Challenge: Edge Deployment Strategy
Apply your knowledge to a real-world scenario.
You need to deploy a multilingual translation tool that runs locally on a laptop with limited GPU resources.
Task 1
Select the appropriate model family and tokenizer for this multilingual, low-resource task.
Solution:
Mistral NeMo with the Tekken Tokenizer. It is optimized for multilingual text and fits within SLM constraints.
Task 2
Define the deployment framework for high-performance local inference.
Solution:
Use ONNX Runtime or Ollama for local execution to maximize hardware acceleration on the laptop.